home *** CD-ROM | disk | FTP | other *** search
- on psSubCatClick
- if voidp(sN) then
- set sN to the clickOn
- end if
- hiliteAnim(sN, "PS_")
- set theLine to sN - 11
- if the frameLabel contains "PS Individuals2" then
- set theLine to theLine + 14
- end if
- LoadPSSubCat(theLine)
- end
-
- on psCatClick sN, theCat
- if voidp(sN) then
- set sN to the clickOn
- end if
- hiliteAnim(sN, "PS_")
- set the visible of sprite 31 to 0
- if theCat = "Custom Marked List" then
- showProdStills("Marked")
- else
- LoadPSCat(theCat)
- end if
- end
-
- on LoadPSCat theCat
- global gResourcePath, gPSCategory, gPSSubCats, gPSIndivid2Flag
- spinCursor()
- set gPSCategory to theCat
- if gPSCategory = "Marked" then
- LinkTo("PS Menu")
- else
- set theLine to LineOffset(gPSCategory, field "PSDATA_C")
- set the itemDelimiter to "|"
- set gPSSubCats to item theLine of field "PSDATA_D"
- put gPSSubCats into field "PS SubCats"
- set the itemDelimiter to ","
- if gPSIndivid2Flag = 1 then
- LinkTo("PS " & theCat & "2")
- set gPSIndivid2Flag to 0
- else
- LinkTo("PS " & theCat)
- end if
- end if
- end
-
- on LinkBackToPSCat
- global gPSCategory
- LoadPSCat(gPSCategory)
- end
-
- on LoadPSSubCat theSprite
- global gPSCategory, gPSSubCats
- spinCursor()
- set theChoice to line theSprite of gPSSubCats
- set theSubCat to gPSCategory & ":" & theChoice
- set theLine to LineOffset(theSubCat, field "PSDATA_R1")
- showProdStills(theLine)
- end
-
- on showProdStills theLine, captionText
- global gPSState, gMarkedList, gPSRecords, gPSViewedHere, gLinkBack, gPSCaption, gOnPC, gPSCategory
- spinCursor()
- if (theLine = EMPTY) or voidp(theLine) then
- set theLine to 1
- end if
- set gPSState to 1
- if gOnPC then
- stopAiff()
- end if
- set theFrame to "PS BG"
- if theLine = "Marked" then
- if gMarkedList = "[]" then
- resetCursor()
- exit
- else
- set gPSRecords to gMarkedList
- end if
- set gPSCaption to "User Marked List"
- set s to count(gPSRecords)
- set gPSViewedHere to s && s
- set gPSCategory to "Marked"
- else
- if theLine = "Links" then
- set theFrame to "PS Links"
- set gPSCaption to captionText
- else
- loadPSData(theLine)
- set theCat to line theLine of field "PSDATA_R1"
- set c to offset(":", theCat)
- put " " after char c of theCat
- set gPSCaption to theCat
- end if
- end if
- spinCursor()
- put gPSCaption into field "PS Cat"
- set the foreColor of cast "PS Cat" to 200
- LinkTo(theFrame)
- if gOnPC then
- pause()
- end if
- set the visible of sprite 31 to 0
- spinCursor()
- updatePS(1)
- if gOnPC then
- continue()
- end if
- resetCursor()
- end
-
- on loadPSData theLine
- global gPSUserViewed, gPSViewedHere, gPSRecords
- spinCursor()
- set theseRecs to line theLine of field "PSDATA_R2"
- delete item 1 of theseRecs
- set theseRecs to value(theseRecs)
- set weightList to []
- set newCats to []
- set oldCats to []
- spinCursor()
- set numRecs to count(theseRecs)
- repeat with z = 1 to numRecs
- if (z mod 20) = 0 then
- spinCursor()
- end if
- set thisCat to getAt(theseRecs, z)
- set a to getOne(gPSUserViewed, thisCat)
- if a > 0 then
- add(weightList, thisCat)
- next repeat
- end if
- add(newCats, thisCat)
- end repeat
- spinCursor()
- set numSeen to count(weightList)
- set numNew to count(newCats)
- set gPSViewedHere to numSeen && numRecs
- spinCursor()
- if numSeen = 0 then
- set gPSRecords to newCats
- else
- if numNew = 0 then
- set gPSRecords to weightList
- else
- delete char 1 of newCats
- delete char the number of chars in newCats of newCats
- delete char 1 of weightList
- delete char the number of chars in weightList of weightList
- set newCats to newCats & ", "
- set gPSRecords to value("[" & newCats & weightList & "]")
- end if
- end if
- end
-
- on psSlideShow
- global gSlideDelay
- stopCursor()
- set continue to 1
- set firstClick to the clickLoc
- set theDelay to 60 * integer(gSlideDelay)
- if theDelay < 60 then
- set theDelay to 60
- end if
- repeat while continue
- nextPS()
- updateStage()
- idle()
- repeat with z = 1 to theDelay
- wait(1)
- if (the mouseDown = 1) or (the clickLoc <> firstClick) then
- set continue to 0
- exit repeat
- end if
- end repeat
- if continue <> 1 then
- exit repeat
- end if
- idle()
- end repeat
- resetCursor()
- startMouse()
- end
-
- on nextPS
- global gPSState, gPSRecords
- set curLine to value(item 1 of gPSState)
- set maxLine to count(gPSRecords)
- if curLine = EMPTY then
- set curLine to 1
- else
- if (curLine > maxLine) or (curLine = maxLine) or (maxLine = 0) then
- if (maxLine = 1) or (maxLine = 0) then
- LinkBackToPSCat()
- resetCursor()
- exit
- else
- set curLine to 1
- end if
- else
- set curLine to curLine + 1
- end if
- end if
- updatePS(curLine)
- end
-
- on prevPS
- global gPSState, gPSRecords
- if the timer < 20 then
- exit
- end if
- set curLine to value(item 1 of gPSState)
- set maxLine to count(gPSRecords)
- if curLine = EMPTY then
- set curLine to 1
- else
- if (curLine = 1) or (maxLine = 0) then
- if (maxLine = 1) or (maxLine = 0) then
- LinkBackToPSCat()
- resetCursor()
- exit
- else
- set curLine to maxLine
- end if
- else
- set curLine to curLine - 1
- end if
- end if
- spinCursor()
- updatePS(curLine)
- resetCursor()
- startMouse()
- end
-
- on updatePS curLine
- global gPSState, gPSRecords, gPSUserViewed, gPSViewedHere, gPSCaption
- set the visible of sprite 35 to 0
- set the visible of sprite 35 to 1
- set recordNum to getAt(gPSRecords, curLine)
- set the movieTime of sprite 31 to recordNum * 60
- if getOne(gPSUserViewed, recordNum) = 0 then
- add(gPSUserViewed, recordNum)
- put word 1 of gPSViewedHere + 1 into word 1 of gPSViewedHere
- end if
- debug("R: " & recordNum)
- put integer(curLine) into item 1 of gPSState
- set isMarked to toggleMarked("Test", recordNum)
- updateStage()
- set the visible of sprite 31 to 1
- updateStage()
- set the movieTime of sprite 31 to recordNum * 60
- set sbTxtHdr to field "PSDATA_0"
- set numChunks to line 1 of sbTxtHdr
- delete line 1 of sbTxtHdr
- repeat with z = 1 to the number of lines in sbTxtHdr
- set sRec to word 1 of line z of sbTxtHdr
- set eRec to word 2 of line z of sbTxtHdr
- if (recordNum >= sRec) and (recordNum <= eRec) then
- exit repeat
- end if
- end repeat
- set theLine to recordNum - sRec + 1
- set theData to line theLine of field ("PSDATA_" & z)
- set the itemDelimiter to "|"
- set theBTS to item 3 of theData
- set theMooV to item 4 of theData
- set the itemDelimiter to ","
- put gPSCaption && theBTS into field "PS Cat"
- if the frameLabel <> "PS Links" then
- set linkBackMsg to "LinkTo " & QUOTE & "PS BG" & QUOTE & RETURN & "UpdatePS " & curLine
- updateLinkIcons(linkBackMsg, "PS_", 0, theMooV, 0, 0)
- end if
- end
-
- on toggleMarked state, theRecord
- global gMarkedList, gPSState, gPSRecords, gOnPC, gResourcePath
- set returnVal to state = "test"
- set theRecord to getAt(gPSRecords, value(item 1 of gPSState))
- set curLine to getOne(gMarkedList, theRecord)
- if gOnPC then
- set thePath to gResourcePath & "SCRNPICT/"
- else
- set thePath to "STARGATE:RESOURCE:SCRNPICT:"
- end if
- if not (returnVal = 1) then
- set state to not (the hilite of cast "Marked")
- put curLine
- if (state = 0) and (curLine > 0) then
- deleteAt(gMarkedList, curLine)
- else
- if (state = 1) and (curLine = 0) then
- add(gMarkedList, theRecord)
- end if
- end if
- set isMarked to state
- else
- set isMarked to curLine <> 0
- end if
- set the hilite of cast "Marked" to isMarked
- if isMarked then
- set the fileName of cast "PS_MARKG.PIC" to thePath & "PS_MARKB.PIC"
- else
- set the fileName of cast "PS_MARKG.PIC" to thePath & "PS_MARKG.PIC"
- end if
- set the hilite of cast "Marked" to isMarked
- return isMarked
- end
-